<!--
  @author heguanghua
  @since 2020/05/12 17:45
-->
<!DOCTYPE html SYSTEM "http://www.thymeleaf.org/dtd/xhtml1-strict-thymeleaf-4.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:th="http://www.thymeleaf.org">
<head th:include="common/common::jscss"/>
<style>
    .layui-form.ew-tree-table { margin-bottom: 0; }
    .ew-tree-table-cell-content { padding: 3px 5px !important; }
    .layui-form-checkbox[lay-skin=primary] { padding-left: 22px; }
</style>
<body>

<div class="layui-fluid"
     th:with="hasPermitAssign=${#authPermit.checkPermit('/role/permit/modify/assign.action') && isAssignAdmin}">

    <blockquote class="layui-crumb">
        <a th:lay-href="|${SYS_MCC}/role/list.action|">角色管理</a>&nbsp;&nbsp;>&nbsp;
        <a th:lay-href="|${SYS_MCC}/role/detail.action?roleId=${obj.roleId}|" lay-text="角色信息" th:text="${obj.roleName}">角色信息</a>&nbsp;&nbsp;>&nbsp;
        权限分配
    </blockquote>

    <div class="layui-card">

        <div class="layui-card-body">

            <blockquote class="layui-elem-quote layui-quote-nm">
                1、操作人不具有"系统全局角色"，只能分配所属部门默认角色所具备的权限（即使个人拥有其他角色权限）；<br/>
                2、分配给角色的权限，被授权此角色的人员将全部继承；<br/>
                3、如员工被授权多个角色，将具备每个角色的全部权限；<br/>
                4、未分配任何一个角色的员工，将默认继承其所属部门的角色权限，反之则只具备被授权的角色权限。
            </blockquote>

            <table class="layui-hide" id="zmn-table" lay-filter="zmn-table"></table>

            <script type="text/html" id="zmn-table-tool">
                <button class="layui-btn layui-btn-sm" lay-event="assign" th:if="${hasPermitAssign}">分配选中权限</button>
            </script>

        </div>

    </div>

</div>
</body>
</html>

<script type="text/javascript" th:inline="javascript">

    var json = {
        roleId: [[${obj.roleId == null ? 0: obj.roleId}]]
    };

    layui.extend({
        treeTable2: "treeTable-3.x",
        role_permit_tree: "role/zmn.role.permit.tree"
    }).use(['index', 'role_permit_tree']);

</script>
